﻿#include<stdbool.h>
typedef struct
{
	char name[256];//符号名
	int type;//类型
	int value;
	bool used;//是否是有效的符号
}SymbolInf;
typedef struct
{
	SymbolInf* symbols;
	int cur;
	int cur_sta;//当前偏移值
	int max_size;
}SymbolTable;//符号表

SymbolInf MakeSymbolInf(char* name, int type, int value);
bool InitSymbolTable(SymbolTable* stable, int s_size);
bool AddSymbol(SymbolTable* stable, SymbolInf sinf);
SymbolInf SearchSymbol(SymbolTable* stable, char* name);
bool SetSymbolType(SymbolTable* table, int idx, int ntype);
bool SetSymbolValue(SymbolTable* table, int idx, int value);
